package com.zd.shopping.apis;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.zd.shopping.bean.WmOmNoticeIEntity;
import com.zd.shopping.bean.WmTmsNoticeIEntity;
import com.zwz.mall.api.BaseApi;
import com.zwz.mall.api.OnRequestListener;
import com.zwz.mall.utils.JSONUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by Administrator on 2019/7/9 0009.
 */

public class DeliverGoodsDetailsApi extends BaseApi
{
 public List list =new ArrayList ();
 public String omnoticeid;
    private WmTmsNoticeIEntity wmTmsNoticeIEntity;

    @Override
    public void loadData(OnRequestListener requestListener) {
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("omnoticeid", omnoticeid);

        super.loadData(getBaseApiService().song_huo_details (hashMap), requestListener);
    }

    @Override
    public void parseResult(JSONObject jsonObject) {
        JSONArray obj = JSONUtils.getJSONArray ("obj", jsonObject);
        for (int i = 0,len=obj.size(); i <len ; i++) {
            JSONObject jsonObject1 = JSONUtils.getJSONObject(i, obj);
            wmTmsNoticeIEntity = new WmTmsNoticeIEntity ();
            wmTmsNoticeIEntity.parse(jsonObject1);
            list.add(wmTmsNoticeIEntity);
        }


    }
}
